package com.hqizcc.ltcs.hqbsltcs.controller;

import com.hqizcc.ltcs.hqbsltcs.service.GetProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class GetProvinceController {

    @Autowired
    private GetProvinceService getProvinceService;

    @RequestMapping("/getProvince")
    public String getProvince(){

        boolean result = getProvinceService.GetProvince();

        if (result){

            System.out.println("爬取省份信息成功");

            return "index";

        } else {

            System.out.println("爬取省份信息失败");

            return "error";

        }

    }
}
